<?php
$tdatatbl_san_pham=array();
	$tdatatbl_san_pham[".NumberOfChars"]=80; 
	$tdatatbl_san_pham[".ShortName"]="tbl_san_pham";
	$tdatatbl_san_pham[".OwnerID"]="";
	$tdatatbl_san_pham[".OriginalTable"]="tbl_san_pham";


	
//	field labels
$fieldLabelstbl_san_pham = array();
if(mlang_getcurrentlang()=="English")
{
	$fieldLabelstbl_san_pham["English"]=array();
	$fieldToolTipstbl_san_pham["English"]=array();
	$fieldLabelstbl_san_pham["English"]["id"] = "Id";
	$fieldToolTipstbl_san_pham["English"]["id"] = "";
	$fieldLabelstbl_san_pham["English"]["ten_san_pham_vn"] = "Ten San Pham Vn";
	$fieldToolTipstbl_san_pham["English"]["ten_san_pham_vn"] = "";
	$fieldLabelstbl_san_pham["English"]["ten_san_pham_en"] = "Ten San Pham En";
	$fieldToolTipstbl_san_pham["English"]["ten_san_pham_en"] = "";
	$fieldLabelstbl_san_pham["English"]["hinh_anh"] = "Hinh Anh";
	$fieldToolTipstbl_san_pham["English"]["hinh_anh"] = "";
	$fieldLabelstbl_san_pham["English"]["mo_ta_ngan_gon_vn"] = "Mo Ta Ngan Gon Vn";
	$fieldToolTipstbl_san_pham["English"]["mo_ta_ngan_gon_vn"] = "";
	$fieldLabelstbl_san_pham["English"]["mo_ta_ngan_gon_en"] = "Mo Ta Ngan Gon En";
	$fieldToolTipstbl_san_pham["English"]["mo_ta_ngan_gon_en"] = "";
	$fieldLabelstbl_san_pham["English"]["mo_ta_chi_tiet_vn"] = "Mo Ta Chi Tiet Vn";
	$fieldToolTipstbl_san_pham["English"]["mo_ta_chi_tiet_vn"] = "";
	$fieldLabelstbl_san_pham["English"]["mo_ta_chi_tiet_en"] = "Mo Ta Chi Tiet En";
	$fieldToolTipstbl_san_pham["English"]["mo_ta_chi_tiet_en"] = "";
	$fieldLabelstbl_san_pham["English"]["ma_danh_muc_san_pham"] = "Ma Danh Muc San Pham";
	$fieldToolTipstbl_san_pham["English"]["ma_danh_muc_san_pham"] = "";
	$fieldLabelstbl_san_pham["English"]["ten_danh_muc_san_pham_vn"] = "Ten Danh Muc San Pham Vn";
	$fieldToolTipstbl_san_pham["English"]["ten_danh_muc_san_pham_vn"] = "";
	$fieldLabelstbl_san_pham["English"]["ten_danh_muc_san_pham_en"] = "Ten Danh Muc San Pham En";
	$fieldToolTipstbl_san_pham["English"]["ten_danh_muc_san_pham_en"] = "";
	if (count($fieldToolTipstbl_san_pham["English"])){
		$tdatatbl_san_pham[".isUseToolTips"]=true;
	}
}


	
	$tdatatbl_san_pham[".NCSearch"]=true;

	

$tdatatbl_san_pham[".shortTableName"] = "tbl_san_pham";
$tdatatbl_san_pham[".nSecOptions"] = 0;
$tdatatbl_san_pham[".recsPerRowList"] = 1;	
$tdatatbl_san_pham[".tableGroupBy"] = "0";
$tdatatbl_san_pham[".mainTableOwnerID"] = "";
$tdatatbl_san_pham[".moveNext"] = 1;




$tdatatbl_san_pham[".showAddInPopup"] = false;

$tdatatbl_san_pham[".showEditInPopup"] = false;

$tdatatbl_san_pham[".showViewInPopup"] = false;


$tdatatbl_san_pham[".fieldsForRegister"] = array();
	
$tdatatbl_san_pham[".listAjax"] = false;

	$tdatatbl_san_pham[".audit"] = false;

	$tdatatbl_san_pham[".locking"] = false;
	
$tdatatbl_san_pham[".listIcons"] = true;
$tdatatbl_san_pham[".edit"] = true;
$tdatatbl_san_pham[".inlineEdit"] = true;
$tdatatbl_san_pham[".view"] = true;

$tdatatbl_san_pham[".exportTo"] = true;

$tdatatbl_san_pham[".printFriendly"] = true;

$tdatatbl_san_pham[".delete"] = true;

$tdatatbl_san_pham[".showSimpleSearchOptions"] = false;

$tdatatbl_san_pham[".showSearchPanel"] = true;


$tdatatbl_san_pham[".isUseAjaxSuggest"] = true;

$tdatatbl_san_pham[".rowHighlite"] = true;


// button handlers file names

$tdatatbl_san_pham[".addPageEvents"] = false;

$tdatatbl_san_pham[".arrKeyFields"][] = "id";

// use datepicker for search panel
$tdatatbl_san_pham[".isUseCalendarForSearch"] = false;

// use timepicker for search panel
$tdatatbl_san_pham[".isUseTimeForSearch"] = false;

$tdatatbl_san_pham[".isUseiBox"] = false;



$tdatatbl_san_pham[".isUseInlineAdd"] = true;

$tdatatbl_san_pham[".isUseInlineEdit"] = true;
$tdatatbl_san_pham[".isUseInlineJs"] = $tdatatbl_san_pham[".isUseInlineAdd"] || $tdatatbl_san_pham[".isUseInlineEdit"];

$tdatatbl_san_pham[".allSearchFields"] = array();

$tdatatbl_san_pham[".globSearchFields"][] = "ten_san_pham_vn";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("ten_san_pham_vn", $tdatatbl_san_pham[".allSearchFields"]))
{
	$tdatatbl_san_pham[".allSearchFields"][] = "ten_san_pham_vn";	
}
$tdatatbl_san_pham[".globSearchFields"][] = "ten_san_pham_en";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("ten_san_pham_en", $tdatatbl_san_pham[".allSearchFields"]))
{
	$tdatatbl_san_pham[".allSearchFields"][] = "ten_san_pham_en";	
}
$tdatatbl_san_pham[".globSearchFields"][] = "hinh_anh";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("hinh_anh", $tdatatbl_san_pham[".allSearchFields"]))
{
	$tdatatbl_san_pham[".allSearchFields"][] = "hinh_anh";	
}
$tdatatbl_san_pham[".globSearchFields"][] = "mo_ta_ngan_gon_vn";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("mo_ta_ngan_gon_vn", $tdatatbl_san_pham[".allSearchFields"]))
{
	$tdatatbl_san_pham[".allSearchFields"][] = "mo_ta_ngan_gon_vn";	
}
$tdatatbl_san_pham[".globSearchFields"][] = "mo_ta_ngan_gon_en";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("mo_ta_ngan_gon_en", $tdatatbl_san_pham[".allSearchFields"]))
{
	$tdatatbl_san_pham[".allSearchFields"][] = "mo_ta_ngan_gon_en";	
}
$tdatatbl_san_pham[".globSearchFields"][] = "ma_danh_muc_san_pham";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("ma_danh_muc_san_pham", $tdatatbl_san_pham[".allSearchFields"]))
{
	$tdatatbl_san_pham[".allSearchFields"][] = "ma_danh_muc_san_pham";	
}
$tdatatbl_san_pham[".globSearchFields"][] = "ten_danh_muc_san_pham_vn";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("ten_danh_muc_san_pham_vn", $tdatatbl_san_pham[".allSearchFields"]))
{
	$tdatatbl_san_pham[".allSearchFields"][] = "ten_danh_muc_san_pham_vn";	
}
$tdatatbl_san_pham[".globSearchFields"][] = "ten_danh_muc_san_pham_en";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("ten_danh_muc_san_pham_en", $tdatatbl_san_pham[".allSearchFields"]))
{
	$tdatatbl_san_pham[".allSearchFields"][] = "ten_danh_muc_san_pham_en";	
}


$tdatatbl_san_pham[".googleLikeFields"][] = "id";
$tdatatbl_san_pham[".googleLikeFields"][] = "ten_san_pham_vn";
$tdatatbl_san_pham[".googleLikeFields"][] = "ten_san_pham_en";
$tdatatbl_san_pham[".googleLikeFields"][] = "hinh_anh";
$tdatatbl_san_pham[".googleLikeFields"][] = "mo_ta_ngan_gon_vn";
$tdatatbl_san_pham[".googleLikeFields"][] = "mo_ta_ngan_gon_en";
$tdatatbl_san_pham[".googleLikeFields"][] = "ma_danh_muc_san_pham";
$tdatatbl_san_pham[".googleLikeFields"][] = "ten_danh_muc_san_pham_vn";
$tdatatbl_san_pham[".googleLikeFields"][] = "ten_danh_muc_san_pham_en";



$tdatatbl_san_pham[".advSearchFields"][] = "id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("id", $tdatatbl_san_pham[".allSearchFields"])) 
{
	$tdatatbl_san_pham[".allSearchFields"][] = "id";	
}
$tdatatbl_san_pham[".advSearchFields"][] = "ten_san_pham_vn";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("ten_san_pham_vn", $tdatatbl_san_pham[".allSearchFields"])) 
{
	$tdatatbl_san_pham[".allSearchFields"][] = "ten_san_pham_vn";	
}
$tdatatbl_san_pham[".advSearchFields"][] = "ten_san_pham_en";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("ten_san_pham_en", $tdatatbl_san_pham[".allSearchFields"])) 
{
	$tdatatbl_san_pham[".allSearchFields"][] = "ten_san_pham_en";	
}
$tdatatbl_san_pham[".advSearchFields"][] = "hinh_anh";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("hinh_anh", $tdatatbl_san_pham[".allSearchFields"])) 
{
	$tdatatbl_san_pham[".allSearchFields"][] = "hinh_anh";	
}
$tdatatbl_san_pham[".advSearchFields"][] = "mo_ta_ngan_gon_vn";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("mo_ta_ngan_gon_vn", $tdatatbl_san_pham[".allSearchFields"])) 
{
	$tdatatbl_san_pham[".allSearchFields"][] = "mo_ta_ngan_gon_vn";	
}
$tdatatbl_san_pham[".advSearchFields"][] = "mo_ta_ngan_gon_en";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("mo_ta_ngan_gon_en", $tdatatbl_san_pham[".allSearchFields"])) 
{
	$tdatatbl_san_pham[".allSearchFields"][] = "mo_ta_ngan_gon_en";	
}
$tdatatbl_san_pham[".advSearchFields"][] = "mo_ta_chi_tiet_vn";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("mo_ta_chi_tiet_vn", $tdatatbl_san_pham[".allSearchFields"])) 
{
	$tdatatbl_san_pham[".allSearchFields"][] = "mo_ta_chi_tiet_vn";	
}
$tdatatbl_san_pham[".advSearchFields"][] = "mo_ta_chi_tiet_en";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("mo_ta_chi_tiet_en", $tdatatbl_san_pham[".allSearchFields"])) 
{
	$tdatatbl_san_pham[".allSearchFields"][] = "mo_ta_chi_tiet_en";	
}
$tdatatbl_san_pham[".advSearchFields"][] = "ma_danh_muc_san_pham";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("ma_danh_muc_san_pham", $tdatatbl_san_pham[".allSearchFields"])) 
{
	$tdatatbl_san_pham[".allSearchFields"][] = "ma_danh_muc_san_pham";	
}
$tdatatbl_san_pham[".advSearchFields"][] = "ten_danh_muc_san_pham_vn";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("ten_danh_muc_san_pham_vn", $tdatatbl_san_pham[".allSearchFields"])) 
{
	$tdatatbl_san_pham[".allSearchFields"][] = "ten_danh_muc_san_pham_vn";	
}
$tdatatbl_san_pham[".advSearchFields"][] = "ten_danh_muc_san_pham_en";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("ten_danh_muc_san_pham_en", $tdatatbl_san_pham[".allSearchFields"])) 
{
	$tdatatbl_san_pham[".allSearchFields"][] = "ten_danh_muc_san_pham_en";	
}

$tdatatbl_san_pham[".isTableType"] = "list";


	

$tdatatbl_san_pham[".isDisplayLoading"] = true;

$tdatatbl_san_pham[".isResizeColumns"] = false;





$tdatatbl_san_pham[".pageSize"] = 20;

$gstrOrderBy = "";
if(strlen($gstrOrderBy) && strtolower(substr($gstrOrderBy,0,8))!="order by")
	$gstrOrderBy = "order by ".$gstrOrderBy;
$tdatatbl_san_pham[".strOrderBy"] = $gstrOrderBy;
	
$tdatatbl_san_pham[".orderindexes"] = array();

$tdatatbl_san_pham[".sqlHead"] = "SELECT tbl_san_pham.id,  tbl_san_pham.ten_san_pham_vn,  tbl_san_pham.ten_san_pham_en,  tbl_san_pham.hinh_anh,  tbl_san_pham.mo_ta_ngan_gon_vn,  tbl_san_pham.mo_ta_ngan_gon_en,  tbl_san_pham.mo_ta_chi_tiet_vn,  tbl_san_pham.mo_ta_chi_tiet_en,  tbl_san_pham.ma_danh_muc_san_pham,  tbl_danh_muc_san_pham.ten_danh_muc_san_pham_vn,  tbl_danh_muc_san_pham.ten_danh_muc_san_pham_en";
$tdatatbl_san_pham[".sqlFrom"] = "FROM tbl_san_pham  INNER JOIN tbl_danh_muc_san_pham ON tbl_danh_muc_san_pham.id = tbl_san_pham.ma_danh_muc_san_pham";
$tdatatbl_san_pham[".sqlWhereExpr"] = "";
$tdatatbl_san_pham[".sqlTail"] = "";




//fill array of records per page for list and report without group fields
$arrRPP = array();
$arrRPP[] = 10;
$arrRPP[] = 20;
$arrRPP[] = 30;
$arrRPP[] = 50;
$arrRPP[] = 100;
$arrRPP[] = 500;
$arrRPP[] = -1;
$tdatatbl_san_pham[".arrRecsPerPage"] = $arrRPP;

//fill array of groups per page for report with group fields
$arrGPP = array();
$arrGPP[] = 1;
$arrGPP[] = 3;
$arrGPP[] = 5;
$arrGPP[] = 10;
$arrGPP[] = 50;
$arrGPP[] = 100;
$arrGPP[] = -1;
$tdatatbl_san_pham[".arrGroupsPerPage"] = $arrGPP;

	$tableKeys = array();
	$tableKeys[] = "id";
	$tdatatbl_san_pham[".Keys"] = $tableKeys;

//	id
	$fdata = array();
	$fdata["strName"] = "id";
	$fdata["ownerTable"] = "tbl_san_pham";
		$fdata["Label"]="Id"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		$fdata["AutoInc"]=true;
	
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "id";
	
		$fdata["FullName"]= "tbl_san_pham.id";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 1;
				$fdata["EditParams"]="";
			
		
		
		
		
		
		
		
		
		
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
				//End validation
	
				
		
				
		
		
		
			$tdatatbl_san_pham["id"]=$fdata;
//	ten_san_pham_vn
	$fdata = array();
	$fdata["strName"] = "ten_san_pham_vn";
	$fdata["ownerTable"] = "tbl_san_pham";
		$fdata["Label"]="Ten San Pham Vn"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "ten_san_pham_vn";
	
		$fdata["FullName"]= "tbl_san_pham.ten_san_pham_vn";
	
		
		
		
		
		
				$fdata["Index"]= 2;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=200";
			$fdata["EditParams"].= " size=60";
	
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
				//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatatbl_san_pham["ten_san_pham_vn"]=$fdata;
//	ten_san_pham_en
	$fdata = array();
	$fdata["strName"] = "ten_san_pham_en";
	$fdata["ownerTable"] = "tbl_san_pham";
		$fdata["Label"]="Ten San Pham En"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "ten_san_pham_en";
	
		$fdata["FullName"]= "tbl_san_pham.ten_san_pham_en";
	
		
		
		
		
		
				$fdata["Index"]= 3;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=200";
			$fdata["EditParams"].= " size=60";
	
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
				//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatatbl_san_pham["ten_san_pham_en"]=$fdata;
//	hinh_anh
	$fdata = array();
	$fdata["strName"] = "hinh_anh";
	$fdata["ownerTable"] = "tbl_san_pham";
		$fdata["Label"]="Hinh Anh"; 
	
		
		$fdata["LinkPrefix"]="upload/"; 
	
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Document upload";
	$fdata["ViewFormat"]= "Document Download";
	
		
		
		
		
		
	$fdata["GoodName"]= "hinh_anh";
	
		$fdata["FullName"]= "tbl_san_pham.hinh_anh";
	
		
		
		
		
		
			$fdata["UploadFolder"]="upload"; 
		$fdata["Index"]= 4;
				
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
				//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatatbl_san_pham["hinh_anh"]=$fdata;
//	mo_ta_ngan_gon_vn
	$fdata = array();
	$fdata["strName"] = "mo_ta_ngan_gon_vn";
	$fdata["ownerTable"] = "tbl_san_pham";
		$fdata["Label"]="Mo Ta Ngan Gon Vn"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text area";
	$fdata["ViewFormat"]= "HTML";
	
		
		
		
		
		
	$fdata["GoodName"]= "mo_ta_ngan_gon_vn";
	
		$fdata["FullName"]= "tbl_san_pham.mo_ta_ngan_gon_vn";
	
		
		$fdata["UseRTE"]=true; 
	
		
		$fdata["UseRTEFCK"] = true;
	
		
				$fdata["Index"]= 5;
			$fdata["EditParams"] = "";
			$fdata["EditParams"].= " rows=100";
		$fdata["nRows"] = 100;
			$fdata["EditParams"].= " cols=600";
		$fdata["nCols"] = 600;
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
				//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatatbl_san_pham["mo_ta_ngan_gon_vn"]=$fdata;
//	mo_ta_ngan_gon_en
	$fdata = array();
	$fdata["strName"] = "mo_ta_ngan_gon_en";
	$fdata["ownerTable"] = "tbl_san_pham";
		$fdata["Label"]="Mo Ta Ngan Gon En"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text area";
	$fdata["ViewFormat"]= "Custom";
	
		
		
		
		
		
	$fdata["GoodName"]= "mo_ta_ngan_gon_en";
	
		$fdata["FullName"]= "tbl_san_pham.mo_ta_ngan_gon_en";
	
		
		$fdata["UseRTE"]=true; 
	
		
		$fdata["UseRTEFCK"] = true;
	
		
				$fdata["Index"]= 6;
			$fdata["EditParams"] = "";
			$fdata["EditParams"].= " rows=100";
		$fdata["nRows"] = 100;
			$fdata["EditParams"].= " cols=600";
		$fdata["nCols"] = 600;
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
				//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatatbl_san_pham["mo_ta_ngan_gon_en"]=$fdata;
//	mo_ta_chi_tiet_vn
	$fdata = array();
	$fdata["strName"] = "mo_ta_chi_tiet_vn";
	$fdata["ownerTable"] = "tbl_san_pham";
		$fdata["Label"]="Mo Ta Chi Tiet Vn"; 
	
		
		
	$fdata["FieldType"]= 128;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text area";
	$fdata["ViewFormat"]= "Custom";
	
		
		
		
		
		
	$fdata["GoodName"]= "mo_ta_chi_tiet_vn";
	
		$fdata["FullName"]= "tbl_san_pham.mo_ta_chi_tiet_vn";
	
		
		$fdata["UseRTE"]=true; 
	
		
		$fdata["UseRTEFCK"] = true;
	
		
				$fdata["Index"]= 7;
			$fdata["EditParams"] = "";
			$fdata["EditParams"].= " rows=1200";
		$fdata["nRows"] = 1200;
			$fdata["EditParams"].= " cols=600";
		$fdata["nCols"] = 600;
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
				//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatatbl_san_pham["mo_ta_chi_tiet_vn"]=$fdata;
//	mo_ta_chi_tiet_en
	$fdata = array();
	$fdata["strName"] = "mo_ta_chi_tiet_en";
	$fdata["ownerTable"] = "tbl_san_pham";
		$fdata["Label"]="Mo Ta Chi Tiet En"; 
	
		
		
	$fdata["FieldType"]= 128;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text area";
	$fdata["ViewFormat"]= "Custom";
	
		
		
		
		
		
	$fdata["GoodName"]= "mo_ta_chi_tiet_en";
	
		$fdata["FullName"]= "tbl_san_pham.mo_ta_chi_tiet_en";
	
		
		$fdata["UseRTE"]=true; 
	
		
		$fdata["UseRTEFCK"] = true;
	
		
				$fdata["Index"]= 8;
			$fdata["EditParams"] = "";
			$fdata["EditParams"].= " rows=1200";
		$fdata["nRows"] = 1200;
			$fdata["EditParams"].= " cols=800";
		$fdata["nCols"] = 800;
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
				//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatatbl_san_pham["mo_ta_chi_tiet_en"]=$fdata;
//	ma_danh_muc_san_pham
	$fdata = array();
	$fdata["strName"] = "ma_danh_muc_san_pham";
	$fdata["ownerTable"] = "tbl_san_pham";
		$fdata["Label"]="Ma Danh Muc San Pham"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Lookup wizard";
	$fdata["ViewFormat"]= "";
	
		
		$fdata["LookupType"]=1;
	$fdata["pLookupType"] = 1;
	$fdata["freeInput"] = 0;	
	$fdata["autoCompleteFieldsOnEdit"] = 0;
	$fdata["autoCompleteFields"] = array();
										$fdata["LinkField"]="id";
	$fdata["LinkFieldType"]=3;
	$fdata["DisplayField"]="id";
				$fdata["LookupTable"]="tbl_danh_muc_san_pham";
	$fdata["LookupOrderBy"]="";
																			
					
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "ma_danh_muc_san_pham";
	
		$fdata["FullName"]= "tbl_san_pham.ma_danh_muc_san_pham";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 9;
				
		
		$fdata["bAddPage"]=true; 
	
		
		$fdata["bEditPage"]=true; 
	
		
		
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
				//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatatbl_san_pham["ma_danh_muc_san_pham"]=$fdata;
//	ten_danh_muc_san_pham_vn
	$fdata = array();
	$fdata["strName"] = "ten_danh_muc_san_pham_vn";
	$fdata["ownerTable"] = "tbl_danh_muc_san_pham";
		$fdata["Label"]="Ten Danh Muc San Pham Vn"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "ten_danh_muc_san_pham_vn";
	
		$fdata["FullName"]= "tbl_danh_muc_san_pham.ten_danh_muc_san_pham_vn";
	
		
		
		
		
		
				$fdata["Index"]= 10;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		
		
		
		
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
				//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatatbl_san_pham["ten_danh_muc_san_pham_vn"]=$fdata;
//	ten_danh_muc_san_pham_en
	$fdata = array();
	$fdata["strName"] = "ten_danh_muc_san_pham_en";
	$fdata["ownerTable"] = "tbl_danh_muc_san_pham";
		$fdata["Label"]="Ten Danh Muc San Pham En"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "ten_danh_muc_san_pham_en";
	
		$fdata["FullName"]= "tbl_danh_muc_san_pham.ten_danh_muc_san_pham_en";
	
		
		
		
		
		
				$fdata["Index"]= 11;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		
		
		
		
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
				//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatatbl_san_pham["ten_danh_muc_san_pham_en"]=$fdata;

	
$tables_data["tbl_san_pham"]=&$tdatatbl_san_pham;
$field_labels["tbl_san_pham"] = &$fieldLabelstbl_san_pham;
$fieldToolTips["tbl_san_pham"] = &$fieldToolTipstbl_san_pham;

// -----------------start  prepare master-details data arrays ------------------------------//
// tables which are detail tables for current table (master)
$detailsTablesData["tbl_san_pham"] = array();

	
// tables which are master tables for current table (detail)
$masterTablesData["tbl_san_pham"] = array();

$mIndex = 1-1;
			$strOriginalDetailsTable="tbl_danh_muc_san_pham";
	$masterTablesData["tbl_san_pham"][$mIndex] = array(
		  "mDataSourceTable"=>"tbl_danh_muc_san_pham"
		, "mOriginalTable" => $strOriginalDetailsTable
		, "mShortTable" => "tbl_danh_muc_san_pham"
		, "masterKeys" => array()
		, "detailKeys" => array()
		, "dispChildCount" => "1"
		, "hideChild" => "0"	
		, "dispInfo" => "1"								
		, "previewOnList" => 1
		, "previewOnAdd" => 0
		, "previewOnEdit" => 0
		, "previewOnView" => 0
	);	
		$masterTablesData["tbl_san_pham"][$mIndex]["masterKeys"][]="id";
		$masterTablesData["tbl_san_pham"][$mIndex]["detailKeys"][]="ma_danh_muc_san_pham";

// -----------------end  prepare master-details data arrays ------------------------------//

require_once(getabspath("classes/sql.php"));










$proto57=array();
$proto57["m_strHead"] = "SELECT";
$proto57["m_strFieldList"] = "tbl_san_pham.id,  tbl_san_pham.ten_san_pham_vn,  tbl_san_pham.ten_san_pham_en,  tbl_san_pham.hinh_anh,  tbl_san_pham.mo_ta_ngan_gon_vn,  tbl_san_pham.mo_ta_ngan_gon_en,  tbl_san_pham.mo_ta_chi_tiet_vn,  tbl_san_pham.mo_ta_chi_tiet_en,  tbl_san_pham.ma_danh_muc_san_pham,  tbl_danh_muc_san_pham.ten_danh_muc_san_pham_vn,  tbl_danh_muc_san_pham.ten_danh_muc_san_pham_en";
$proto57["m_strFrom"] = "FROM tbl_san_pham  INNER JOIN tbl_danh_muc_san_pham ON tbl_danh_muc_san_pham.id = tbl_san_pham.ma_danh_muc_san_pham";
$proto57["m_strWhere"] = "";
$proto57["m_strOrderBy"] = "";
$proto57["m_strTail"] = "";
$proto58=array();
$proto58["m_sql"] = "";
$proto58["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto58["m_column"]=$obj;
$proto58["m_contained"] = array();
$proto58["m_strCase"] = "";
$proto58["m_havingmode"] = "0";
$proto58["m_inBrackets"] = "0";
$proto58["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto58);

$proto57["m_where"] = $obj;
$proto60=array();
$proto60["m_sql"] = "";
$proto60["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto60["m_column"]=$obj;
$proto60["m_contained"] = array();
$proto60["m_strCase"] = "";
$proto60["m_havingmode"] = "0";
$proto60["m_inBrackets"] = "0";
$proto60["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto60);

$proto57["m_having"] = $obj;
$proto57["m_fieldlist"] = array();
						$proto62=array();
			$obj = new SQLField(array(
	"m_strName" => "id",
	"m_strTable" => "tbl_san_pham"
));

$proto62["m_expr"]=$obj;
$proto62["m_alias"] = "";
$obj = new SQLFieldListItem($proto62);

$proto57["m_fieldlist"][]=$obj;
						$proto64=array();
			$obj = new SQLField(array(
	"m_strName" => "ten_san_pham_vn",
	"m_strTable" => "tbl_san_pham"
));

$proto64["m_expr"]=$obj;
$proto64["m_alias"] = "";
$obj = new SQLFieldListItem($proto64);

$proto57["m_fieldlist"][]=$obj;
						$proto66=array();
			$obj = new SQLField(array(
	"m_strName" => "ten_san_pham_en",
	"m_strTable" => "tbl_san_pham"
));

$proto66["m_expr"]=$obj;
$proto66["m_alias"] = "";
$obj = new SQLFieldListItem($proto66);

$proto57["m_fieldlist"][]=$obj;
						$proto68=array();
			$obj = new SQLField(array(
	"m_strName" => "hinh_anh",
	"m_strTable" => "tbl_san_pham"
));

$proto68["m_expr"]=$obj;
$proto68["m_alias"] = "";
$obj = new SQLFieldListItem($proto68);

$proto57["m_fieldlist"][]=$obj;
						$proto70=array();
			$obj = new SQLField(array(
	"m_strName" => "mo_ta_ngan_gon_vn",
	"m_strTable" => "tbl_san_pham"
));

$proto70["m_expr"]=$obj;
$proto70["m_alias"] = "";
$obj = new SQLFieldListItem($proto70);

$proto57["m_fieldlist"][]=$obj;
						$proto72=array();
			$obj = new SQLField(array(
	"m_strName" => "mo_ta_ngan_gon_en",
	"m_strTable" => "tbl_san_pham"
));

$proto72["m_expr"]=$obj;
$proto72["m_alias"] = "";
$obj = new SQLFieldListItem($proto72);

$proto57["m_fieldlist"][]=$obj;
						$proto74=array();
			$obj = new SQLField(array(
	"m_strName" => "mo_ta_chi_tiet_vn",
	"m_strTable" => "tbl_san_pham"
));

$proto74["m_expr"]=$obj;
$proto74["m_alias"] = "";
$obj = new SQLFieldListItem($proto74);

$proto57["m_fieldlist"][]=$obj;
						$proto76=array();
			$obj = new SQLField(array(
	"m_strName" => "mo_ta_chi_tiet_en",
	"m_strTable" => "tbl_san_pham"
));

$proto76["m_expr"]=$obj;
$proto76["m_alias"] = "";
$obj = new SQLFieldListItem($proto76);

$proto57["m_fieldlist"][]=$obj;
						$proto78=array();
			$obj = new SQLField(array(
	"m_strName" => "ma_danh_muc_san_pham",
	"m_strTable" => "tbl_san_pham"
));

$proto78["m_expr"]=$obj;
$proto78["m_alias"] = "";
$obj = new SQLFieldListItem($proto78);

$proto57["m_fieldlist"][]=$obj;
						$proto80=array();
			$obj = new SQLField(array(
	"m_strName" => "ten_danh_muc_san_pham_vn",
	"m_strTable" => "tbl_danh_muc_san_pham"
));

$proto80["m_expr"]=$obj;
$proto80["m_alias"] = "";
$obj = new SQLFieldListItem($proto80);

$proto57["m_fieldlist"][]=$obj;
						$proto82=array();
			$obj = new SQLField(array(
	"m_strName" => "ten_danh_muc_san_pham_en",
	"m_strTable" => "tbl_danh_muc_san_pham"
));

$proto82["m_expr"]=$obj;
$proto82["m_alias"] = "";
$obj = new SQLFieldListItem($proto82);

$proto57["m_fieldlist"][]=$obj;
$proto57["m_fromlist"] = array();
												$proto84=array();
$proto84["m_link"] = "SQLL_MAIN";
			$proto85=array();
$proto85["m_strName"] = "tbl_san_pham";
$proto85["m_columns"] = array();
$proto85["m_columns"][] = "id";
$proto85["m_columns"][] = "ten_san_pham_vn";
$proto85["m_columns"][] = "ten_san_pham_en";
$proto85["m_columns"][] = "hinh_anh";
$proto85["m_columns"][] = "mo_ta_ngan_gon_vn";
$proto85["m_columns"][] = "mo_ta_ngan_gon_en";
$proto85["m_columns"][] = "mo_ta_chi_tiet_vn";
$proto85["m_columns"][] = "mo_ta_chi_tiet_en";
$proto85["m_columns"][] = "ma_danh_muc_san_pham";
$obj = new SQLTable($proto85);

$proto84["m_table"] = $obj;
$proto84["m_alias"] = "";
$proto86=array();
$proto86["m_sql"] = "";
$proto86["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto86["m_column"]=$obj;
$proto86["m_contained"] = array();
$proto86["m_strCase"] = "";
$proto86["m_havingmode"] = "0";
$proto86["m_inBrackets"] = "0";
$proto86["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto86);

$proto84["m_joinon"] = $obj;
$obj = new SQLFromListItem($proto84);

$proto57["m_fromlist"][]=$obj;
												$proto88=array();
$proto88["m_link"] = "SQLL_INNERJOIN";
			$proto89=array();
$proto89["m_strName"] = "tbl_danh_muc_san_pham";
$proto89["m_columns"] = array();
$proto89["m_columns"][] = "id";
$proto89["m_columns"][] = "ten_danh_muc_san_pham_vn";
$proto89["m_columns"][] = "ten_danh_muc_san_pham_en";
$obj = new SQLTable($proto89);

$proto88["m_table"] = $obj;
$proto88["m_alias"] = "";
$proto90=array();
$proto90["m_sql"] = "tbl_danh_muc_san_pham.id = tbl_san_pham.ma_danh_muc_san_pham";
$proto90["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "id",
	"m_strTable" => "tbl_danh_muc_san_pham"
));

$proto90["m_column"]=$obj;
$proto90["m_contained"] = array();
$proto90["m_strCase"] = "= tbl_san_pham.ma_danh_muc_san_pham";
$proto90["m_havingmode"] = "0";
$proto90["m_inBrackets"] = "0";
$proto90["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto90);

$proto88["m_joinon"] = $obj;
$obj = new SQLFromListItem($proto88);

$proto57["m_fromlist"][]=$obj;
$proto57["m_groupby"] = array();
$proto57["m_orderby"] = array();
$obj = new SQLQuery($proto57);

$queryData_tbl_san_pham = $obj;
$tdatatbl_san_pham[".sqlquery"] = $queryData_tbl_san_pham;

$tableEvents["tbl_san_pham"] = new eventsBase;

?>
